package site.weiyikai.eventdriven.core;

import java.util.Arrays;
import java.util.function.Predicate;


/**
 *
 *
 * @author 程序员小魏
 * 创建时间: 2023/11/06
 */
public abstract class PredicateBuilder {

    public static <T> Predicate<T> isInstanceOf(Class<T> type) {
        return type::isInstance;
    }

//    public static Predicate or(Predicate... predicates) {
//        return (Predicate) Arrays.stream(predicates).reduce(Predicate::or).get();
//    }
//
//    public static Predicate and(Predicate... predicates) {
//        return (Predicate) Arrays.stream(predicates).reduce(Predicate::and).get();
//    }
}
